package com.csproj.basic.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 路径
 * @author Sun
 */
@ApiModel(description = "路径 @author Sun")
@Entity
@Table(name = "t_base_path")
public class Path implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    /**
     * 起始站点地址
     */
    @ApiModelProperty(value = "起始站点地址")
    @Column(name = "start_site_id")
    private String startSiteId;

    /**
     * 起始仓库地址
     */
    @ApiModelProperty(value = "起始仓库地址")
    @Column(name = "start_warehouse_id")
    private String startWarehouseId;


    /**
     * 目的站点地址
     */
    @ApiModelProperty(value = "目的站点地址")
    @Column(name = "end_site_id")
    private String endSiteId;

    /**
     * 目的仓库地址
     */
    @ApiModelProperty(value = "目的仓库地址")
    @Column(name = "end_warehouse_id")
    private String endWarehouseId;

    /**
     * 方式
     */
    @ApiModelProperty(value = "方式")
    @Column(name = "type")
    private String type;

    /**
     * 方式
     */
    @ApiModelProperty(value = "方式")
    @Column(name = "geo_json")
    private String geoJson;

    /**
     * 引用路径
     */
    @ApiModelProperty(value = "引用路径")
    @Column(name = "parent_id")
    private String parentId;


    /**
     * 路径编号
     */
    @ApiModelProperty(value = "路径编号")
    @Column(name = "path_no")
    private String pathNo;

    /**
     * 是否默认路径
     */
    @ApiModelProperty(value = "是否默认路径")
    @Column(name = "default_flag")
    private Boolean defaultFlag;

    /**
     * 启用标志
     */
    @ApiModelProperty(value = "启用标志")
    @Column(name = "enable_flag")
    private Boolean enableFlag;

    private String reason;
    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStartSiteId() {
        return startSiteId;
    }

    public Path startSiteId(String startSiteId) {
        this.startSiteId = startSiteId;
        return this;
    }

    public void setStartSiteId(String startSiteId) {
        this.startSiteId = startSiteId;
    }

    public String getStartWarehouseId() {
        return startWarehouseId;
    }

    public Path startWarehouseId(String startWarehouseId) {
        this.startWarehouseId = startWarehouseId;
        return this;
    }

    public String getEndSiteId() {
        return endSiteId;
    }

    public Path endSiteId(String endSiteId) {
        this.endSiteId = endSiteId;
        return this;
    }

    public void setEndSiteId(String endSiteId) {
        this.endSiteId = endSiteId;
    }

    public void setStartWarehouseId(String startWarehouseId) {
        this.startWarehouseId = startWarehouseId;
    }

    public String getEndWarehouseId() {
        return endWarehouseId;
    }

    public Path endWarehouseId(String endWarehouseId) {
        this.endWarehouseId = endWarehouseId;
        return this;
    }

    public void setEndWarehouseId(String endWarehouseId) {
        this.endWarehouseId = endWarehouseId;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getType() {
        return type;
    }

    public Path type(String type) {
        this.type = type;
        return this;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getParentId() {
        return parentId;
    }

    public Path parent(String parentId) {
        this.parentId = parentId;
        return this;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getGeoJson() {
        return geoJson;
    }

    public Path geoJson(String geoJson) {
        this.geoJson = geoJson;
        return this;
    }

    public void setGeoJson(String geoJson) {
        this.geoJson = geoJson;
    }

    public String getPathNo() {
        return pathNo;
    }

    public Path pathNo(String pathNo) {
        this.pathNo = pathNo;
        return this;
    }

    public void setPathNo(String pathNo) {
        this.pathNo = pathNo;
    }

    public Boolean isDefaultFlag() {
        return defaultFlag;
    }

    public Path defaultFlag(Boolean defaultFlag) {
        this.defaultFlag = defaultFlag;
        return this;
    }

    public void setDefaultFlag(Boolean defaultFlag) {
        this.defaultFlag = defaultFlag;
    }

    public Boolean isEnableFlag() {
        return enableFlag;
    }

    public Path enableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
        return this;
    }

    public void setEnableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public Path deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public Path deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public Path deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public Path lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public Path lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public Path creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public Path creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Path path = (Path) o;
        if (path.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), path.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "Path{" +
            "id=" + getId() +
            ", startSiteId='" + getStartSiteId() + "'" +
            ", startWarehouseId='" + getStartWarehouseId() + "'" +
            ", endSiteId='" + getEndSiteId() + "'" +
            ", endWarehouseId='" + getEndWarehouseId() + "'" +
            ", parentId='" + getParentId() + "'" +
            ", type='" + getType() + "'" +
            ", geoJson='" + getGeoJson() + "'" +
            ", pathNo='" + getPathNo() + "'" +
            ", defaultFlag='" + isDefaultFlag() + "'" +
            ", enableFlag='" + isEnableFlag() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
